﻿//获取浏览器页面可见高度和宽度
var _PageHeight = document.documentElement.clientHeight,
    _PageWidth = document.documentElement.clientWidth;
//计算loading框距离顶部和左部的距离（loading框的宽度为215px，高度为61px）
var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
    _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;

//function loadingInit(msg){
//	//在页面未加载完毕之前显示的loading Html自定义内容
//	var _LoadingHtml = '<div class="modal fade" id="loadDiv"><div style="margin-top:' + _LoadingTop + 'px;"><div style="margin-left:auto;margin-right:auto;cursor1: wait; width:fit-content;width:-webkit-fit-content;width:-moz-fit-content; height: 57px; line-height: 57px; padding-left: 50px; padding-right: 5px; background: #fff url(/img/loading.gif) no-repeat scroll 5px 10px; border: 2px solid #95B8E7; color: #696969;font-family: Microsoft YaHei;font-size:20px;">'+msg+'</div></div></div>';
//	$("body").append(_LoadingHtml);
//}
function loadingInit(msg){
	//在页面未加载完毕之前显示的loading Html自定义内容
	var _LoadingHtml = '<div class="modal" id="loadDiv" style="text-align: center"><div style="margin-top:' + _LoadingTop + 'px;"><div style="margin-left:auto;margin-right:auto;cursor1: wait; width:fit-content;width:-webkit-fit-content;width:-moz-fit-content; height: 57px; line-height: 57px; padding-left: 50px; padding-right: 5px; color: #ffffff;font-family: Microsoft YaHei;font-size:20px;"><img src="../../images/loading.gif"  style="no-repeat scroll 5px 10px;" />'+msg+'</div></div></div>';
	$("body").append(_LoadingHtml);
}
//显示loading画面
function loadingShow(){
	$("#loadDiv").modal({backdrop:"static"});
}

//关闭loading画面
function loadingHide(){
	$("#loadDiv").modal("hide");
}

